package com.ft.springboottravel.mapper;

import com.ft.springboottravel.bean.Route_Img;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface Route_ImgMapper {

    @Select("select * from route_img where route_id = #{Route_Id} limit #{currentPage},4")
    List<Route_Img> selectlistRoute_Img(Integer Route_Id,Integer currentPage);

    @Select("select count(route_id) from route_img")
    long selectLong(Integer Route_Id);

    @Select("select * from route_img where img_id = #{img_id}")
    Route_Img selectRoute_Img(Integer img_id);

    @Insert("insert into route_img value(0,#{route_id},#{img_src})")
    void addRoute_Img(Route_Img Route_Img);

    @Delete("delete  from route_img where img_id = #{Route_Img_Id}")
    void dele(Integer Route_Img_Id);

    @Update("update route_img set route_id = #{routeId},img_src = #{imgSrc} where img_id = #{imgId}")
    void edit(Route_Img Route_Img);




}
